package org.example.day20240813;

import java.util.Scanner;

public class test2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String num = scanner.nextLine();
        char[] arr = num.toCharArray();
        int sum = 0;
        for(int i = 0; i<arr.length; i++){
            sum += arr[i]-'0';
        }
        System.out.println(sum);
    }
}
